<?php

namespace App\Console\Commands;

use App\Services\CollectService;
use Illuminate\Console\Command;

class Collect extends Command
{
    /**
     * The name and signature of the console command.
     *
     * @var string
     */
    protected $signature = 'command:collect {category}';

    /**
     * The console command description.
     *
     * @var string
     */
    protected $description = '数据采集';

    /**
     * Create a new command instance.
     *
     * @return void
     */
    public function __construct()
    {
        parent::__construct();
    }

    /**
     * Execute the console command.
     *
     * @return int
     */
    public function handle(CollectService $collectService)
    {
        $collectService->categoty($this->argument('category')); //分类采集

    }
}
